package com.yazi.mxz.common.entity.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * StorePayId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class StorePayId implements java.io.Serializable {

	// Fields

	private Long storeId;
	private Long catId;

	// Constructors

	/** default constructor */
	public StorePayId() {
	}

	/** full constructor */
	public StorePayId(Long storeId, Long catId) {
		this.storeId = storeId;
		this.catId = catId;
	}

	// Property accessors

	@Column(name = "STORE_ID", nullable = false, precision = 15, scale = 0)
	public Long getStoreId() {
		return this.storeId;
	}

	public void setStoreId(Long storeId) {
		this.storeId = storeId;
	}

	@Column(name = "CAT_ID", nullable = false, precision = 15, scale = 0)
	public Long getCatId() {
		return this.catId;
	}

	public void setCatId(Long catId) {
		this.catId = catId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof StorePayId))
			return false;
		StorePayId castOther = (StorePayId) other;

		return ((this.getStoreId() == castOther.getStoreId()) || (this
				.getStoreId() != null && castOther.getStoreId() != null && this
				.getStoreId().equals(castOther.getStoreId())))
				&& ((this.getCatId() == castOther.getCatId()) || (this
						.getCatId() != null && castOther.getCatId() != null && this
						.getCatId().equals(castOther.getCatId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getStoreId() == null ? 0 : this.getStoreId().hashCode());
		result = 37 * result
				+ (getCatId() == null ? 0 : this.getCatId().hashCode());
		return result;
	}

}